Manchester | 26-ITP-Jan | khalidbih | Sprint 3 | coursework/sprint-3-implement-and-rewrite #1270
Manchester | 26-ITP-Jan | khalidbih | Sprint 3 | coursework/sprint-3-implement-and-rewrite #1270khalidbih wants to merge 11 commits intoCodeYourFuture:mainfrom
Conversation
|
Hi @cjyuan, I’ve created a new PR, and there are no merge conflicts now. |
| test("should return true when absolute numerator is less than absolute denominator", () => { | ||
| expect(isProperFraction(-4, 7)).toEqual(true); | ||
| }); |
There was a problem hiding this comment.
We can use pseudo-code or notations such as abs(...) or |...|, and < in the description to make it more concise. For example,
test("should return true when abs(numerator) < abs(denominator)", () => {
expect(isProperFraction(-4, 7)).toEqual(true);
... // Test all combination of positive/negative numerator and denominator.
});
There was a problem hiding this comment.
I updated the test description.
| test("should return true when numerator < denominator and denominator is negative", () => { | ||
| expect(isProperFraction(4, -7)).toEqual(true); | ||
| }); | ||
| test("should return true when numerator and denominator are both negative and numerator < denominator", () => { | ||
| expect(isProperFraction(-4, -7)).toEqual(true); | ||
| }); |
There was a problem hiding this comment.
Could also use the absolute value notation on these descriptions.
In math, 4 is larger than -7, and -4 is larger than -7. The absolute value notation could help make the description concise.
There was a problem hiding this comment.
Thank you for the suggestion, I’ll keep this in mind for future tests.
Thank you for all your feedback and guidance. |
|
Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it. |
Self checklist :
Changelist :
I have completed the coursework/sprint-3-implement-and-rewrite.